package com.ruantu.clothing.service;

import com.ruantu.clothing.entity.Gongyingshang;
import com.ruantu.clothing.entity.PageBean;
import com.ruantu.clothing.util.MyException;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.util.List;

/**
 * Created by Administrator on 2018/6/7 0007.
 */
public interface GongyingshangService {

    /**
     * 查询所有供应商 combobox用
     *
     * @return
     */
    List<Gongyingshang> findAll(String jgid);

    /**
     * 查询供应商
     *
     * @param gongyingshang
     * @param pageBean
     * @return
     */
    List<Gongyingshang> findGongyingshangList(Gongyingshang gongyingshang, PageBean pageBean);

    /**
     * 导出excel供应商
     *
     * @param gongyingshang
     * @param
     * @return
     */
    XSSFWorkbook downExcel(Gongyingshang gongyingshang);

    /**
     * 保存供应商
     *
     * @param gongyingshang
     * @return
     */
    int saveGongyingshang(Gongyingshang gongyingshang);

    /**
     * 查询是否存在该供应商
     *
     * @return
     */
    int findGname(Gongyingshang gongyingshang);

    /**
     * 查询供应商修改反显
     *
     * @return
     */
    Gongyingshang findGongyingshangById(Gongyingshang gongyingshang);

    /**
     * 删除供应商
     *
     * @param gongyingshang
     * @return
     */
    int delGongyingshang(Gongyingshang gongyingshang);

    /**
     * 查询本机构的供应商根据分类查询
     *
     * @param gongyingshang
     * @return
     */
    List<Gongyingshang> findCombobox(Gongyingshang gongyingshang);
}
